<?php

class Application_Form_Userdetails extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');
        
        /* Form Elements & Other Definitions Here ... */
        $this->addElement('hidden', 'id', array(
            //'label'      => 'id',
            //'required'   => true,
            //'hidden' => true,
            //'filters'    => array('StringTrim'),
            //'validators' => array('EmailAddress'),
        ));
        $this->addElement('text', 'email', array(
            'label'      => 'Email:',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array('EmailAddress'),
        ));
        $this->addElement('text', 'givenname', array(
            'label'      => 'First name: ',
            'required'   => true,
            'filters'    => array('StringTrim'),
            //'validators' => array('EmailAddress'),
        ));
        $this->addElement('text', 'familyname', array(
            'label'      => 'Surname: ',
            'required'   => true,
            'filters'    => array('StringTrim'),
            //'validators' => array('EmailAddress'),
        ));
        $this->addElement('checkbox', 'active', array(
            'label'      => 'Active: ',
            'required'   => true,
        ));
        
        $this->addElement('select', 'role', array(
            'label'      => 'Role: ',
            //'required'   => true,
            'multioptions'     => array('admin'=>'admin','projectmanager'=>'projectmanager','designer'=>'designer','developer'=>'developer','customer'=>'customer'),
        ));
        
        // Add the submit button
        $this->addElement('submit', 'submit', array(
            'ignore'   => true,
            'label'    => 'Save',
        ));
        
        
 
        // And finally add some CSRF protection
        $this->addElement('hash', 'csrf', array(
            'ignore' => true,
        ));
    }


}

